package com.ruoyi.special.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.db.mapper.SpecialDataStarAddupInfoMapper;
import com.ruoyi.db.domain.SpecialDataStarAddupInfo;
import com.ruoyi.special.service.ISpecialDataStarAddupInfoService;
import com.ruoyi.common.core.text.Convert;

/**
 * 机构星级回传详情信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-11
 */
@Service
@DataSource(DataSourceType.SLAVE)
public class SpecialDataStarAddupInfoServiceImpl implements ISpecialDataStarAddupInfoService 
{
    @Autowired
    private SpecialDataStarAddupInfoMapper specialDataStarAddupInfoMapper;

    /**
     * 查询机构星级回传详情信息
     * 
     * @param id 机构星级回传详情信息主键
     * @return 机构星级回传详情信息
     */
    @Override
    public SpecialDataStarAddupInfo selectSpecialDataStarAddupInfoById(Long id)
    {
        return specialDataStarAddupInfoMapper.selectSpecialDataStarAddupInfoById(id);
    }

    /**
     * 查询机构星级回传详情信息列表
     * 
     * @param specialDataStarAddupInfo 机构星级回传详情信息
     * @return 机构星级回传详情信息
     */
    @Override
    public List<SpecialDataStarAddupInfo> selectSpecialDataStarAddupInfoList(SpecialDataStarAddupInfo specialDataStarAddupInfo)
    {
        return specialDataStarAddupInfoMapper.selectSpecialDataStarAddupInfoList(specialDataStarAddupInfo);
    }

    /**
     * 查询机构星级回传详情信息列表
     *
     * @param specialDataStarAddupInfo 机构星级回传详情信息
     * @return 机构星级回传详情信息
     */
    @Override
    public List<Map<String, Object>> selectSpecialDataStarAddupInfoListMap(SpecialDataStarAddupInfo specialDataStarAddupInfo)
    {
        return specialDataStarAddupInfoMapper.selectSpecialDataStarAddupInfoListMap(specialDataStarAddupInfo);
    }

    /**
     * 新增机构星级回传详情信息
     * 
     * @param specialDataStarAddupInfo 机构星级回传详情信息
     * @return 结果
     */
    @Override
    public int insertSpecialDataStarAddupInfo(SpecialDataStarAddupInfo specialDataStarAddupInfo)
    {
        specialDataStarAddupInfo.setCreateTime(DateUtils.getNowDate());
        return specialDataStarAddupInfoMapper.insertSpecialDataStarAddupInfo(specialDataStarAddupInfo);
    }

    /**
     * 修改机构星级回传详情信息
     * 
     * @param specialDataStarAddupInfo 机构星级回传详情信息
     * @return 结果
     */
    @Override
    public int updateSpecialDataStarAddupInfo(SpecialDataStarAddupInfo specialDataStarAddupInfo)
    {
        specialDataStarAddupInfo.setUpdateTime(DateUtils.getNowDate());
        return specialDataStarAddupInfoMapper.updateSpecialDataStarAddupInfo(specialDataStarAddupInfo);
    }

    /**
     * 批量删除机构星级回传详情信息
     * 
     * @param ids 需要删除的机构星级回传详情信息主键
     * @return 结果
     */
    @Override
    public int deleteSpecialDataStarAddupInfoByIds(String ids)
    {
        return specialDataStarAddupInfoMapper.deleteSpecialDataStarAddupInfoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除机构星级回传详情信息信息
     * 
     * @param id 机构星级回传详情信息主键
     * @return 结果
     */
    @Override
    public int deleteSpecialDataStarAddupInfoById(Long id)
    {
        return specialDataStarAddupInfoMapper.deleteSpecialDataStarAddupInfoById(id);
    }
}
